import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)
const routes = [
    {
        path:"",
        redirect:"/home"
    },
    {
        path:"/home",
        component:()=>import('../views/home/home.vue')
    },
    {
        path:"/category",
        component:()=>import('../views/category/category.vue')
    },
    {
        path:"/cart",
        component:()=>import('../views/cart/cart.vue')
    },
    {
        path:"/my",
        component:()=>import('../views/my/my.vue')
    },
    {
        path:"/details/:id",
        component:()=>import('../views/details/details.vue')
    }
]

const router = new Router({
    routes,
    mode:'history'
})

export default router